<?php $this->load->view('header/admin'); ?>
<div id="main">
    <div class="container">
        <div class="span-17 colborder" id="content">
	        <?php if (isset($messages)) echo $messages; ?>
	        <h3>Licenses</h3>
            <div class="span-17 box last">
                <p>We have <?php echo $licensed_count ?> licensed pilots 
                   and <?php echo $unlicensed_count; ?> unlicensed. </p>
            </div>
			<?php if ($licenses): ?>
                <div id="info" class="span-16 last">
                    <div class="span-5 box">
                        <p>Click on the name of the license for its description</p>
                        <dl>
                        <?php foreach($licenses as $c): ?>
                            <dt class="caps prepend-top">
                                <?php echo anchor('admin/licenses/see/'.$c->id, $c->issuer.' - '.
                                    $c->level, 'class="license-info" id="license-'.$c->id.'"')?>
                                    <span class="small"><i>(<?php echo $licensed[$c->id]['pilots']?>)</i></span>
                            </dt>
                            <dd>
                                [ <?php echo anchor('admin/licenses/edit/'.$c->id, 'Edit', 'class="license-edit" id="license-'.$c->id.'"')?> |
                                  <?php echo anchor('admin/licenses/delete/'.$c->id, 'Delete', 'class="license-edit" id="license-'.$c->id.'"')?> ]
                            </dd>
                        <?php endforeach; ?>
                        </dl>
                    </div>		 
                    <div id="license-details" class="box span-9 last" style="">
                        <dl>
                            <dt class="caps">Issuer: </dt> 
                            <dd id="license-issuer">&nbsp;</dd>
                            <dt class="caps prepend-top">Level: </dt>
                            <dd id="license-level">&nbsp;</dd>
                            <dt class="caps prepend-top">Description: </dt> 
                            <dd id="license-description">&nbsp;</dd>
                        </dl>
                    </div>
		</div>
		<?php endif; ?>
		<div class="span-16 last">
            <p><?php echo anchor('admin/licenses/add', 'Add License')?> | <?php echo anchor('home', 'Home')?></p>
        </div>
        </div> <!-- end content -->
        <?php $this->load->view('menu/admin')?>
    </div> <!-- end container -->
</div> <!-- end main -->
<?php $this->load->view('footer/standard');?>
